When developing program code, a developer will often make use of an integrated development environment (IDE). An IDE is a development tool in the form of a computer application that combines together multiple facilities for use by a developer in creating and developing their program code, preferably combined together into a single application or package. For example, the IDE would typically provide a source code editor which the developer can use to type in and edit the high-level source code from which the program is to be compiled. The IDE would also typically provide a compiler for compiling the source code to assembly code or machine code, an assembler for assembling assembly code into machine code, and a linker for linking together the machine code of different object files. The IDE may also include facilities allowing the developer to investigate the logical or hierarchical structure of different components within the program, such as the relationship between different objects and/or classes in program created using an object-oriented language.
Furthermore, an IDE will often include some kind of code analysis software for performing a test run of the code. In many cases, the code being developed may be intended for (and indeed only be suitable for) execution on a processor other than that of the computer terminal on which the IDE application is run. The intended processor is referred to as the target processor or target device. In such a case, a sample of the target processor may be connected externally to the developer's terminal via a peripheral interface. The analysis software will then include a loader which uses the peripheral interface to load the developed code (in its executable machine-code form) into a memory of the target processor and control the target to execute that code for the purpose of testing.
In addition, the analysis software will further include some software for analysing the actual runtime behavior of the executed code, using observations made via the peripheral interface as the code is executed. This may be referred to as dynamic analysis (as opposed to static analysis which is done without any actual execution of the code). To facilitate the dynamic analysis, either the code to be tested is instrumented with test-related instructions which output trace information relating to the executed code's behavior on the target, or otherwise the analysis software requests trace information to be received from the target processor, for example using some form of interrupts.
One type of analysis software is a debugger for identifying errors in the code. In that case, the trace information includes information regarding exceptions or error traps occurring during the test execution, and the debugger collects this information and reports on the associated errors. The debugger may also provide facilities to aid the developer in assessing the errors such as by locating their source.
Another type of analysis software is a profiler. In that case, the trace information includes reports on events occurring during the normal execution of the code, such as the number, frequency and/or duration of certain function calls or system calls or accesses to certain addressed locations. The results provided by the profiler then help the developer to optimise the code with regard to one or more finite resources of the target, such as processing usage or memory usage.